package main

import (  
	"reflect"
	"unicode/utf8"
    "fmt"
	_"strconv"
)

func main89() { 
    var A,B string
	// string的单元有可能是byte，也有可能是int32(rune)
	ch :='3'
	var  int32122 int32 ='2'
	// 这样的声明和赋值方式，怪怪的
	var  ch22 int32 = 2322
	fmt.Println(ch,int32122,ch22)
    num:=80
	A= "我I国"
	B ="123222434989989"
	word :=[]int32(A)
	// wordArr :=[num]int32{} , golang不支持动态绑定其长度，用处很局限
	// fmt.Println(wordArr)
	fmt.Println(num)
	for _,val :=range word{
		fmt.Println(val,string(val))
	}

	var a,b []int
	// fmt.Scan(&A),读入和c语言也很相似
	fmt.Println(A[0])
	fmt.Println(utf8.RuneCountInString(A))
	fmt.Println(B)
	fmt.Println(a,b)
    
	dict  :=make(map[int]string)
	dict[1323] = "tsinghua"
	var dict2 map[int]string =make(map[int]string)

	fmt.Println(reflect.TypeOf(dict2))
	var us user00111= user00111{}
	fmt.Println(reflect.TypeOf(us))
	fmt.Println(dict[1323])

	var arr2 *[10]int = new([10]int)
	fmt.Println(arr2)
}

type user00111 struct{
	Name string 
	Email string 
	Ext int
	Privileged bool
}
